No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
Introduction
------------
MicroPhone's script language has a wealth of functions, each of which serves a specific purpose. We take a look at a handful of functions and come up with some real world examples of how to use them.
DayOfWeek
---------
Use this function when you want to know the current day of the week. The function will return a number from 1 to 7, corresponding to Sunday through Saturday. The example script will display the current day of week, and then translate it into the correct name for that day. For example, if the day of week is 1, the script will return "Sunday".
Month
-----
Use this function when you want to know the current month of the year. The function will return a number from 1 to 12, corresponding to January through December. The example script will display the current month of the year, and then translate it into the correct name for that month. For example, if the month of the year is 1, the script will return "January".
FileCRTR
--------
Use this function when you want to know the creator of a certain file on your hard drive. The example script will allow you to select a file. It will then display the file creator for this file.
FileTYPE
--------
Use this function when you want to know the type of a certain file on your hard drive. The example script will allow you to select a file. It will then display the file type for this file. If the file you select is an application, it will tell you.
GetVols and GetDir
------------------
Use these functions to get a list of the volumes mounted on your desktop or the contents of a specified directory. The example script will show you a list of volumes and let you select one. After selecting one, it will show you to contents of the root of this volume.
NextKey
-------
Use this function when you want to know what a user is typing on the keyboard. The example script will show you everything you type, one character at a time, until you hit the escape key.